06: Conflict policy constants - #6
Open
nikolaystrikhar wants to merge 3 commits into
Open
Conversation
Open
Nothing validated a policy string. The resolver switches on it with a default branch that deactivates, so a typo or a stale filter return would turn off a plugin the site owner deliberately activated -- the most surprising of the three outcomes to arrive at by accident. all() and is_valid() give callers a way to tell unknown from DEACTIVATE. Also pin the constant set by reflection, so a fourth policy cannot be added without the resolver's switch being revisited, and correct the DEACTIVATE description: the bundled copy loads on the next request, not this one, since the standalone has already defined the guard constant and the request ends at the redirect.
nikolaystrikhar
force-pushed
the
06-conflict-policy
branch
from
August 6, 2026 14:22
127f04c to
686266b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the three conflict-policy string constants, plus
all()andis_valid().Stacked on #5.
is_valid()closes a destructive default. Nothing validated a policy before: the resolver'sdefault:fell intodeactivate(), so'defered'from a typo or someone else's filter would deactivate a plugin the site owner deliberately turned on. Unknown is now its own case, falling back toNOTICE_ONLY.default:would otherwise swallow.DEACTIVATEdescription corrected in the README and docblock. The bundled copy does not load on that request — the standalone has already defined the guard constant beforeplugins_loaded, so the request ends at the redirect and the load happens next request.